﻿using System;
using System.Data;
using AccessControl.Common;
using AccessControl.DataAcess;

namespace AccessControl.Business
{

    public static class PersonBusiness
    {


        public static AccessControlDS.tblPersonDataTable SelectAll()
        {
            return PersonAccess.SelectAll();
        }

        public static DataTable SelectAllWithoutPhoto()
        {
            return PersonAccess.SelectAllWithoutPhoto();
        }

        public static AccessControlDS.tblPersonDataTable SelectByFilter(string filter)
        {
            return PersonAccess.SelectByFilter(filter);

        }
        
        public static void Insert(AccessControlDS.tblPersonRow row)
        {
            PersonAccess.Insert(row);
        }

        public static void Update(AccessControlDS.tblPersonRow row)
        {
            PersonAccess.Update(row);

        }

        public static void Delete(AccessControlDS.tblPersonRow row)
        {
            PersonAccess.Delete(row);
        }

        public static void Delete(String pkPerson)
        {
            PersonAccess.Delete(pkPerson);
        }

        public static AccessControlDS.tblPersonDataTable SelectByFilter(string perosnRefNumber, string personFirstName, string personLastName)
        {
            return PersonAccess.SelectByFilter( perosnRefNumber,  personFirstName,  personLastName);
        }
    }
}
